package org.llc.flink.study.collection.list


object List2 {
  def main(args: Array[String]): Unit = {

    // 创建时，直接分配元素
    val list = List(1, 2, 4)
    // List(1, 2, 4)
    println(list)

    // 空集合
    val nil = Nil
    println(nil)
    println(list(1))

    val list1 = list :+ 5
    println(list1)
    val list2 = 0 +: list1
    println(list2)

    val list4 = List(1, 2, 3, "abc")
    val list5 = 4 :: 5 :: 6 :: list4 :: Nil
    println("list5=" + list5)
    val list6 = 4 :: 5 :: 6 :: list4 ::: Nil
    println("list6=" + list6)


  }
}
